from django.db import models


class Video(models.Model):
    video = models.CharField(max_length=20)
    update_tm = models.DateField('更新时间')

    def __str__(self):
        return self.video


class Url(models.Model):
    video = models.ForeignKey(Video, on_delete=models.CASCADE)
    name = models.CharField(max_length=60)
    url = models.CharField(max_length=400)

    def __str__(self):
        return self.url
